package org.smarthings.test;

import org.smarthings.Message;
import org.smarthings.MessageBroker;
import org.smarthings.Response;

public class FakeBrokerImpl extends MessageBroker {
	private static final FakeBrokerImpl instance = new FakeBrokerImpl();
	private Message message;

	private FakeBrokerImpl() {
		// singleton
	}

	public static MessageBroker getInstance() {
		return instance;
	}

	public Response post(Message message) {
		this.message = message;
		System.out.println(message.toString());
		return Response.getEmptyResponse();
	}

	public Message get(String uri, String contentType) {
		return message;
	}
}